interface Product {
  id: number
  name: string
  price: number
}

const products: Product[] = [
  { id: 1, name: 'Product 1', price: 100 },
  { id: 2, name: 'Product 2', price: 200 },
  { id: 3, name: 'Product 3', price: 300 }
]

export default defineEventHandler(async (event) => {
  // 模拟异步
  await new Promise(resolve => setTimeout(resolve, 500))

  return {
    status: 'success',
    data: products
  }
})